﻿<Window x:Class="P2.Cuberry.Modules.SimpleAccounting.HRPayroll.HRPayrollItemsDetailsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="389" Width="337"
        
        Icon="/P2.Cuberry;component/Images/CuberryIcon32.ico"
        Title="Peacequare Cuberry"              
        Background="{DynamicResource P2BackgroundBrush}" 
        Loaded="Window_Loaded"
        >
    
    <Window.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/Styles.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
    </Window.Resources>

    <Grid>
<Grid.Resources>
            <Image x:Key="SaveAndCloseIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleAccounting.HRPayroll;component/Images/Cancel.png" />
            <Image x:Key="SaveAndNewIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleAccounting.HRPayroll;component/Images/SaveAndNew.ico" />
            <Image x:Key="CancelIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleAccounting.HRPayroll;component/Images/cancel.png" />

            <Image x:Key="BookIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleAccounting.HRPayroll;component/Images/book16.gif" />
            <Image x:Key="CancelTransactionIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleAccounting.HRPayroll;component/Images/cancelTransaction16.gif" />

            <Image x:Key="Printer2Icon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleAccounting.HRPayroll;component/Images/printer2.png" />
            <Image x:Key="FindIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleAccounting.HRPayroll;component/Images/find16.gif" />
    

        </Grid.Resources>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="40" />
            <RowDefinition Height="35" />
            <RowDefinition Height="*"/>
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>

        <!-- Row 0 Start -->
        
        <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Margin="0,0,0,0" Content="Financial Transaction Item" Style="{StaticResource P2DetailViewHeaderTextStyle}" />

        <Separator Margin="0,0,0,0" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Bottom" Height="0"/>
        <!-- Row 0 End -->

        <!-- Row 1: Menu Start -->
        <Border  Grid.Row="1" Grid.Column="0"  Style="{StaticResource P2MenuBorderStyle}">
            <Menu Grid.Row="1" x:Name="menuMain" Style="{StaticResource P2MenuStyle}" >
           
                <MenuItem x:Name="SaveBtn" InputGestureText="Ctrl+S" Header="{Translate SaveAndCloseBtn}" Command="{Binding HRPayrollItemSaveCommand}" Icon="{StaticResource SaveAndCloseIcon}" Style="{StaticResource P2MenuItemStyle}" />
                <MenuItem x:Name="SaveAndNewBtn" InputGestureText="Ctrl+S" Header="{Translate SaveAndNewBtn}" Command="{Binding HRPayrollItemSaveAndNewCommand}" Icon="{StaticResource SaveAndNewIcon}" Style="{StaticResource P2MenuItemStyle}" />

                <!--
                <MenuItem x:Name="CloseBtn" InputGestureText="Ctrl+X" Header="{Translate SaveAndCloseBtn}" Command="{Binding HRPayrollItemCloseCommand}" Icon="{StaticResource CancelIcon}" Style="{StaticResource P2MenuItemStyle}"/>
 -->
            </Menu>
        </Border>
        <!-- Row 1 End -->
        <!-- Row 2: All Fields -->
        <Border  Grid.Row="2" Grid.Column="0"  Style="{StaticResource P2ContentBorderStyle}">
            <Grid >


                <Label HorizontalAlignment="Left" Margin="5,3,0,0" Name="PayrollCodeNoL" Width="120" Height="28" VerticalAlignment="Top" Content="{Translate PayrollCodeNoL}" ></Label>
                <TextBox  Margin="5,24,5,0" Name="PayrollCodeNo" Height="23" Width="120" Text="{Binding PayrollCodeNo, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"  HorizontalAlignment="Left"  VerticalAlignment="Top" Style="{StaticResource P2TextBoxStyle}"/>
                <Button Margin="130,23,0,0" Height="23" Name="FindFiAccount" VerticalAlignment="Top" Width="23" Command="{Binding HRPayrollItemFindCommand}" HorizontalAlignment="Left">
                <Image  Source="/P2.Cuberry.Modules.SimpleAccounting.HRPayroll;component/Images/find16.gif"></Image>                    
                </Button>
                <Button Margin="155,23,0,0" Height="23" Name="RefreshFiAccount" VerticalAlignment="Top" Width="23" Command="{Binding FiAccountRefreshCommand}" HorizontalAlignment="Left">
                    <Image  Source="/P2.Cuberry.Modules.SimpleAccounting.HRPayroll;component/Images/Refresh.ico"></Image>
                </Button>
                <TextBox  Margin="5,51,5,0" Name="PayrollCodeName" Height="23" Width="250" Text="{Binding PayrollCodeName, Mode=OneWay, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"  HorizontalAlignment="Left"  VerticalAlignment="Top" Style="{StaticResource P2TextBoxStyle}" IsEnabled="False"/>
<!--
                <ComboBox  Margin="95,51,5,0" Name="PayrollCodeID" Width="250" HorizontalAlignment="Left"  SelectedValue="{Binding PayrollCodeID}" 
                           ItemsSource="{Binding AvailablePayrollCodes}"
                           IsReadOnly="True" SelectedValuePath="PayrollCodeID" DisplayMemberPath="PayrollCodeNameCur" Height="23" VerticalAlignment="Top" Style="{StaticResource P2ComboBoxStyle}" />
    -->            
                
                <Label  Height="28" HorizontalAlignment="Left" Margin="5,80,5,0" Name="PaymentDescriptionL" VerticalAlignment="Top" Width="120" Content="{Translate PaymentDescriptionL}" />
                <TextBox Margin="5,104,46,86" Name="PaymentDescription" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" Text="{Binding PaymentDescription , ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Style="{StaticResource P2TextBoxStyle}" />

                <Label HorizontalAlignment="Left" Margin="5,0,0,55" Name="PaymentAmountL" Width="120" Content="{Translate PaymentAmountL}" Height="28" VerticalAlignment="Bottom"></Label>
                <TextBox  Margin="5,0,0,37" Name="PaymentAmount" Height="23" Width="120" Text="{Binding PaymentAmount, StringFormat=F2, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"  HorizontalAlignment="Left"  VerticalAlignment="Bottom" Style="{StaticResource P2TextBoxStyle}" GotFocus="PaymentAmount_GotFocus" FlowDirection="LeftToRight"  TextAlignment="Right"/>
                
                
            </Grid>
        </Border>

    </Grid>
</Window>
